package com.ykq.controller;

import com.ykq.annotation.MethodAnnotation;
import com.ykq.service.PermissionService;
import com.ykq.vo.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Arrays;
import java.util.List;

/**
 * @program: qy174-mrcai
 * @description:
 * @author: 闫克起
 * @create: 2024-06-05 10:15
 **/
@RestController
@RequestMapping("/permission")
public class PermissionController {
    @Autowired
    private PermissionService permissionService;

    @GetMapping("/leftMenu")
    @MethodAnnotation("获取左侧菜单")
    public R leftMenu(){
        return permissionService.findByEmpId();
    }

    @GetMapping("/listByRoleId")
    public R listByRoleId(Integer roleId){
        return permissionService.selectByRoleId(roleId);
    }

    @GetMapping("qrFen")
    public R qrFen(Integer rid, Long[] checkIds){

        return permissionService.qrFen(rid,checkIds);
    }
}
